<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>网站后台管理系统</title>
<meta name="keywords" content="">
<meta name="description" content="">
<!--[if lte IE 6]>
<link rel="stylesheet" type="text/css" href="css/ie6.css"/>
<![endif]-->
<link rel="stylesheet" type="text/css"  href="../../../../Public/admin/css/style_v2.0.css"/>
<link rel="stylesheet" type="text/css"  href="../../../../Public/layui/css/layui.css">
<link rel="stylesheet" type="text/css"  href="__PUBLIC__/admin/css/style_v2.0.css"/>
<link rel="stylesheet" type="text/css"  href="__PUBLIC__/layui/css/layui.css">
<script type="text/javascript" src="__PUBLIC__/js/jquery-1.8.3.min.js"></script>
<script type="text/javascript" src="__PUBLIC__/layui/layui.js"></script>
</head>
<body>
<div class="position mt10">当前位置：<a href="{:U('Index/main')}">后台首页</a>  > <a href="{:U('Host/vps')}">VPS管理</a>  >   VPS信息修改</div>
<div id="container">
  <fieldset class="layui-elem-field layui-field-title" style="margin-top: 20px;">
      <legend>VPS信息修改</legend>
  </fieldset>
  
<div class="c"></div> 
<form name=reg action="{:U('Admin/Host/vps_update', array('vid' => $data['vid']))}"  enctype="multipart/form-data"  method="post"  class="layui-form" id="vps_add">
<div class="layui-form">
    <table class="layui-table">
    <tr>
	  <td width="20%" align="right"><font color=red size="1">·</font>服务器名称：</td>
	  <td width="80%">
      <span class="table_span" style="width:300px; float:left;"><input name="vpsname" type="text" id="vpsname" value="{$data.vpsname}" required  lay-verify="" placeholder="服务器名称" autocomplete="off" class="layui-input"></span>
      <span class="table_txt"></span>      </td>
    </tr>
    <tr>
	  <td width="20%" align="right"><font color=red size="1">·</font>服务器IP：</td>
	  <td width="80%">
      <span class="table_span" style="width:300px; float:left;"><input name="vpsip" type="text" id="vpsip" value="{$data.vpsip}" required  lay-verify="" placeholder="服务器IP" autocomplete="off" class="layui-input"></span>
      <span class="table_txt"></span>      </td>
    </tr>
    <tr>
	  <td width="20%" align="right"><font color=red size="1">·</font>所属账号：</td>
	  <td width="80%">
      <span class="table_span" style="width:300px; float:left;">
          <select name="account" lay-verify="" lay-filter="">
          <option value="">请选择账号</option>
           <volist name="account" id="a">
           <option value="{$a.aid}" <if condition="$data['aid'] eq $a['aid']">selected</if>>{$a.aname}</option>
           </volist>
        </select>
      </span>
      <span class="table_txt"></span>      </td>
    </tr>
    <tr>
	  <td width="20%" align="right"><font color=red size="1">·</font>所在机房：</td>
	  <td width="80%">
      <span class="table_span" style="width:300px; float:left;"><input name="jifang" type="text" id="jifang" value="{$data.jifang}" required  lay-verify="" placeholder="机房" autocomplete="off" class="layui-input"></span>
      <span class="table_txt"></span>      </td>
    </tr>
     <tr>
	  <td width="20%" align="right">状态：</td>
	  <td width="80%">
      <span class="table_span" style="float:left;">
      <input type="radio" name="status" value="1" title="正常运行" <if condition="$data['status'] eq 1">checked</if>> &nbsp;&nbsp;&nbsp; 
      <input type="radio" name="status" value="0" title="已停止"  <if condition="$data['status'] eq 0">checked</if>>&nbsp;&nbsp;&nbsp; 
      <input type="radio" name="status" value="2" title="临时关闭"  <if condition="$data['status'] eq 2">checked</if>>&nbsp;&nbsp;&nbsp;      </span>
      <span class="table_txt"></span>      </td>
    </tr>
    <tr>
	  <td width="20%" align="right">配置：</td>
	  <td width="80%">
      <span class="table_txt">CPU:</span>
      <span class="table_span" style="width:50px; float:left; padding:0px;">
      <input name="cpu" type="text" id="cpu" value="{$data.cpu}"  lay-verify="" placeholder="" autocomplete="off" class="layui-input">
      </span>
      <span class="table_txt">核&nbsp;&nbsp;&nbsp;内存：</span>
      <span class="table_span" style="width:50px; float:left;padding:0px;">
      <input name="memory" type="text" id="memory" value="{$data.memory}"  lay-verify="" placeholder="" autocomplete="off" class="layui-input">
      </span>
      <span class="table_txt">M&nbsp;&nbsp;&nbsp;硬盘：</span>
      <span class="table_span" style="width:50px; float:left;padding:0px;">
      <input name="harddisk" type="text" id="harddisk" value="{$data.harddisk}"  lay-verify="" placeholder="" autocomplete="off" class="layui-input">
      </span>
      <span class="table_txt">G&nbsp;&nbsp;&nbsp;带宽：</span>
      <span class="table_span" style="width:50px; float:left;padding:0px;">
      <input name="bandwidth" type="text" id="bandwidth" value="{$data.bandwidth}"  lay-verify="" placeholder="" autocomplete="off" class="layui-input">
      </span>
      <span class="table_txt">M</span>
      </td>
    </tr>
    <tr>
	  <td width="20%" align="right"><font color=red size="1">·</font>服务器时间：</td>
	  <td width="80%">
      <input name="vpsstart" type="text" id="vpsstart" value="{$data.vpsstart|date='Y-m-d',###}"  placeholder="开始日" class="layui-input ico-date"  style="width:120px; float:left;">
      <span class="table_span">~</span>
      <input name="vpsend" type="text" id="vpsend" value="{$data.vpsend|date='Y-m-d',###}"  placeholder="结束日" class="layui-input ico-date"  style="width:120px; float:left;">
      </td>
    </tr>
    <tr>
	  <td width="20%" align="right">远程账号：</td>
	  <td width="80%">
       <div class="fee_box"><span class="table_txt">远程账号：</span><span style="width:230px; float:left;"><input name="remote[0]" type="text" id="remote" value="{$remote['0']}"  autocomplete="off" class="layui-input" placeholder="" ></span>
       <span class="table_txt">端口：</span><span style="width:60px; float:left;"><input name="remote[1]" type="text" id="remote" value="{$remote['1']}"  autocomplete="off" class="layui-input" placeholder="" ></span>
       </div>
       <div class="fee_box"><span class="table_txt">登录密码：</span><span style="width:230px; float:left;"><input name="remote[2]" type="text" id="ftp" value="{$remote['2']}"  autocomplete="off" class="layui-input" placeholder="" ></span></div>
      </td>
    </tr>
    <tr>
	  <td width="20%" align="right">超级FTP：</td>
	  <td width="80%">
       <div class="fee_box"><span class="table_txt">FTP账号：</span><span style="width:230px; float:left;"><input name="superftp[0]" type="text" id="remote" value="{$superftp['0']}"  autocomplete="off" class="layui-input" placeholder="" ></span>
       <span class="table_txt">端口：</span><span style="width:60px; float:left;"><input name="superftp[1]" type="text" id="remote" value="{$superftp['1']}"  autocomplete="off" class="layui-input" placeholder="" ></span>
       </div>
       <div class="fee_box"><span class="table_txt">FTP密码：</span><span style="width:230px; float:left;"><input name="superftp[2]" type="text" id="ftp" value="{$superftp['2']}"  autocomplete="off" class="layui-input" placeholder="" ></span></div>
      </td>
    </tr>
    <tr>
	  <td align="right">VPS描述：</td>
	  <td><span class="table_span" style="width:300px; float:left;"><textarea name="content" type="text" id="content" value=""  lay-verify="" placeholder="其他信息" autocomplete="off" class="layui-textarea" style="height:60px;">{$data.content}</textarea></span>      </td>
    </tr>
    <tr>
	     <td align="right">排序：</td>
	     <td><span class="table_txt"><input type="text" name="listorder" value="{$data.listorder}" class="layui-input" style="width:50px;"></span>
            <span class="table_txt"><font color="#666666">（越大越靠前）</font></span></td>
      </tr>
	  <td align="right"><font color=red size="1">·</font>添加时间：</td>
	  <td><input name="inputtime" type="text" id="inputtime" value="{$data.inputtime|date='Y-m-d H:i:s',###}"  autocomplete="off" class="layui-input ico-date"  style="width:250px; float:left;" ></td>
	  </tr>
    <tr> 
	  <td colspan=2 align="center" valign="middle">
		<input type="submit" name="Submit" value="确&nbsp; &nbsp;定" class="layui-btn" >
		<input type="reset" name="Submit2" value="重　置" class="layui-btn layui-btn-primary" >		 </td>
	</tr>
    </table>
</div>
</form>
</div>
<script type="text/javascript" src="__PUBLIC__/js/common.js"></script>
</body>
</html>
<script>

//Demo
layui.use(['form','laydate'], function(){
  var form = layui.form
  ,laydate = layui.laydate;
   //,layer = layui.layer
  laydate.render({
    elem: '#inputtime'
	,type: 'datetime'
  });
  laydate.render({
    elem: '#vpsstart'
  });
  laydate.render({
    elem: '#vpsend'
  });
   
   form.verify({
        groupname: function(value){
		    if(value !="" || value.length  >0){
			    
			}else{
			   return '请填写分组名称';
			}
		}   
	   ,listorder: function(value){
	       if(value != ""){
			   if(!new RegExp(/^\d*$/).test(value)){
		            return '必须是数字0';
		       }
		   }
	   }
   });
   
   
  //监听提交
  form.on('submit(formSearch)', function(data){
    //layer.msg(JSON.stringify(data.field));
	title: '最终的提交信息'
	return true;
  });

});

</script>